package com.wang.gateway.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;


@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "security.ignore")
public class IgnoreWhiteProperties {
    /**
     * 白名单列表,网关对白名单中的路径不进行校验
     */
    private List<String> whites = new ArrayList<>();

    public List<String> getWhites() {
        return whites;
    }

    public void setWhites(List<String> whites) {
        this.whites = whites;
    }
}

//@ConfigurationProperties(prefix = "security.ignore")的作用:
//将配置文件中以security.ignore为前缀的属性,映射到被注解类对应的字段上.
//这里就是将配置文件中的security.ignore.whites属性映射到本类中的whites字段上.
